﻿// ====================================================================
//  Texy.net - XML-RPC client for Texy! formatter
//  (c) 2006 Aleš Roubíček - Creative Commons 2.5 License
// --------------------------------------------------------------------
//  version: 1.0 RC2
// ====================================================================

using System;
using System.Configuration;

namespace Rarous.TexyNet.Configuration
{
    /// <summary>
    /// 
    /// </summary>
    public class QuoteModuleElement : ConfigurationElement
    {
        #region Constructors
        /// <summary>
        /// Konstruktor
        /// </summary>
        public QuoteModuleElement()
        { }
        #endregion

        #region Properties
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty("allowedLine", IsRequired = false, DefaultValue = true)]
        public bool AllowedLine
        {
            get { return Convert.ToBoolean(this["allowedLine"]); }
            set { this["allowedLine"] = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty("allowedBlock", IsRequired = false, DefaultValue = true)]
        public bool AllowedBlock
        {
            get { return Convert.ToBoolean(this["allowedBlock"]); }
            set { this["allowedBlock"] = value; }
        }
        #endregion

        #region Override Methods
        /// <summary>
        /// Nastavuje výchozí hodnoty
        /// </summary>
        protected override void InitializeDefault()
        {
            AllowedLine = true;
            AllowedBlock = true;
            base.InitializeDefault();
        }
        #endregion
    }
}
